﻿<%@ Page Language="C#" MasterPageFile="~/MainMaster.master" AutoEventWireup="true"
    CodeFile="Mails.aspx.cs" Inherits="Mails" ValidateRequest="false" meta:resourcekey="PageResource1"%>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="cc1" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link rel="shortcut icon" href="icons/logo.ico" type="image/x-icon" />
    <link href="jqModal.css" rel="stylesheet" type="text/css" />

    <script src="jqModal.js" type="text/javascript"></script>

    <style type="text/css">
        tr .tabbone4{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:right;
	
}
.adel4{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  right;
}
         .zr3 {
	background-image:url('images/button2.png');
	display:block;
	float:right;
	 padding: 0px 10px 0px 10px;
	height:21px;
	text-align:center;
	color:#fff;
	text-shadow:1px 1px 0px #003a5e;
	margin-right:2px;
	line-height:19px;
	font-weight:bold;
	text-decoration:none;
	font-family:Tahoma;
	font-size:12px;


}
.zr3:hover ,.zr3:active {
	background-image:url('images/button2.png');
	text-shadow:1px 1px 0px #003a5e;
	background-position:0px -21px;
	
}
  .stylelabel3
       {
       	color:#064c66;
	 font-weight:bold;
	 direction:rtl;
	 text-align:right;
       	}
             .tab3{
	width:815px;
 direction:rtl;
 border:1px #ccc solid;
 border-radius:5px;
 }

tr .tabbone3{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:center;
	
}
 .req3
       {
           color:Red;
       } 
.adel3{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  center;
}
.he3{
	background-color:#fff;
	padding:5px;
	font-family:Tahoma;
	font-size:14px;
	font-weight:bold;
}
.txt3
{
    border:1px solid black;
    margin-bottom:5px;
    margin-top:5px;
    }
        

        .lok
     {
	display: none;
	color: red;
     }
        .HideButton
        {
            display: none;
        }
        .collapse
        {
            background-color: #C0C0C0;
            display: block;
        }
        .result
        {
            background-color: #C0C0C0;
            display: block;
        }
        .rek
        {
            background-color: #FF0066;
            color: #FF00FF;
            background-image: url(icons/Attachment2.png);
        }
        .mytable
        {
            background-color: #C0B0B0;
        }
        .jqmWindow
        {
            display: none;
            position: fixed;
            top: 17%;
            left: 50%;
            margin-left: -300px;
            width: 800px;
            background-color: #EEE;
            color: #333;
            border: 1px solid black;
            padding: 12px;
        }
        .jqmOverlay
        {
            background-color: #000;
        }
        /* Fixed posistioning emulation for IE6
     Star selector used to hide definition from browsers other than IE6
     For valid CSS, use a conditional include instead */
        * html .jqmWindow
        {
            position: absolute;
            top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px');
        }
    </style>

    <script type="text/javascript">

        function quickread(RowIndex) {


            var x = document.getElementById(RowIndex);

            var y = document.getElementById('Text1');
            y.value = x.value;

        }

        function GetCellValue(RowIndex) {


            window.open("mailindetails.aspx?index=" + RowIndex, '_blank');


        }


        function there() {

            $("#dialog").jqm({ modal: true }).jqmShow();


        }
        function Sents() {
            var y = document.getElementById('issent');
            y.style.display = "block";

            setTimeout('getback()', 6000);

        }
        function getback() {
            var y = document.getElementById('issent');
            y.style.display = "none";
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" 
                                    EnableViewState="true">
                                    <ContentTemplate>
<table dir="rtl" width="100%" style="table-layout:fixed">
<tr>
<td style="width:100px">

    <h3 class="Lablcss">
        اختر العميل</h3>

</td>
<td >

    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
        CssClass="txt3" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" 
        style="float:right" width="100px">
        <asp:ListItem Value="companies">العملاء</asp:ListItem>
        <asp:ListItem Value="publishers">الناشرين</asp:ListItem>
        <asp:ListItem Value="distributers">الموزعين</asp:ListItem>
    </asp:DropDownList>

</td>
<td>

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="SELECT company, cast(id as nvarchar) +','+email1 as email1 FROM companies"></asp:SqlDataSource>

</td>
<td>

</td>
</tr>
<tr>
<td>

</td>
<td>

    <asp:ListBox ID="customers" runat="server" AutoPostBack="True" CssClass="txt3" 
        DataSourceID="SqlDataSource1" DataValueField="email1" EnableViewState="true" 
        Height="148px" OnSelectedIndexChanged="ListBox1_SelectedIndexChanged" 
        SelectionMode="Multiple" style="text-align:right" Width="320px">
    </asp:ListBox>

</td>
<td>

</td>
<td>

</td>
</tr>
<tr>
<td></td>
<td>
    <asp:LinkButton ID="LinkButton1" runat="server" NavigateUrl="#" 
        OnClick="LinkButton1_Click" ValidationGroup="come">الكل</asp:LinkButton>
    </td>

<td></td>
<td></td>

</tr>
<tr>
<td>
    <h3 class="Lablcss">
        بريد العميل</h3>
    </td>
<td>
    <asp:TextBox ID="TextBox2" runat="server" CssClass="txt3" style="float:right" 
        Width="300px"></asp:TextBox>
    </td>
<td>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
        ControlToValidate="TextBox2" ErrorMessage="<%$ Resources:Resource, required %>" 
        ValidationGroup="go"></asp:RequiredFieldValidator>
    </td>
<td></td>

</tr>
</table>

 </ContentTemplate>
                                </asp:UpdatePanel>
                                
  <table width="100%" dir="rtl" style="table-layout:fixed">
  <tr>
  <td style="width:100px">
                                                    &nbsp;</td>
  <td>
                                                    &nbsp;</td>
  <td >
                                                        &nbsp;</td>
  <td>
                                                        &nbsp;</td>
  </tr>
  <tr>
  <td>
                                <h3 class="Lablcss" >عنوان الرسالة</h3>
                                    </td>
  <td >
                                <asp:TextBox ID="subject" CssClass="txt3" runat="server" Width="300px" Style="margin-bottom: 0px"></asp:TextBox>
                            </td>
  <td>
                                    &nbsp;</td>
  <td>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="<%$ Resources:Resource, required %>"
                                    ControlToValidate="subject" ValidationGroup="go"></asp:RequiredFieldValidator>
                                
                            </td>
  </tr>
  <tr>
  <td>
                                <h3 class="Lablcss">
                                    موضوع الرسالة</h3>
                            </td>
  <td colspan="3">
                                <cc1:Editor ID="Editor1" runat="server" class="ajax__htmleditor_editor_container"
                                    HtmlPanelCssClass="ajax__htmleditor_editor_toptoolbar" />
                            </td>
  </tr>
  <tr>
  <td>
                                <h3 class="Lablcss" style="width: 100px">
                                    اضف ملف
                                </h3>
                                <h3 class="Lablcss" style="width: 100px">
                                    (لايزيد عن 5 MB)
                                </h3>
                            </td>
  <td align="right">
                                <eo:AJAXUploader ID="AJAXUploader1" runat="server" AutoUpload="True" MaxDataSize="3000"
                                    TempFileLocation="~/temp" Width="300px" PostedFileLabelFormat="{posted_file_name} -  ({posted_file_size} bytes)"
                                    ProgressBarSkin="Windows_Vista">
                                    <LayoutTemplate>
                                        <table border="0" cellpadding="2" cellspacing="0" width="250px">
                                            <tr>
                                                <td>
                                                    <asp:PlaceHolder runat="server" ID="InputPlaceHolder">Input Box Place Holder </asp:PlaceHolder>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Button runat="server" ID="UploadButton" CssClass="zr3" Text="حمل" Visible="false" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td >
                                                    <eo:ProgressBar runat="server" ID="ProgressBar" ControlSkinID="Windows_Vista" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:PlaceHolder runat="server" ID="ProgressTextPlaceHolder">Progress Text Place Holder
                                                    </asp:PlaceHolder>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Button runat="server" CssClass="zr3" ID="CancelButton" Text="الغاء" />
                                                </td>
                                                <tr>
                                                    <td dir="rtl">
                                                        <asp:PlaceHolder runat="server" ID="PostedFilesPlaceHolder">Posted Files Place Holder
                                                        </asp:PlaceHolder>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <asp:Button runat="server" ID="DeleteButton" CssClass="zr3" Text="مسح الملفات المختارة" />
                                                    </td>
                                                </tr>
                                        </table>
                                    </LayoutTemplate>
                                </eo:AJAXUploader>
                            </td>
  <td align="right">
                                <asp:Label CssClass="Lablcss" ID="filenames" runat="server" Text=""></asp:Label>
                            </td>
  <td>
                                &nbsp;</td>
  </tr>
  <tr>
  <td></td>
  <td>
                                
                            &nbsp;</td>
  <td></td>
  <td>
                                
                            <asp:Button CssClass="zr3" ID="Button1" runat="server" OnClick="Button1_Click"
                                    Text="ارسال رسالة" ValidationGroup="go" />
                                
                            </td>
  </tr>
  </table>                              
    
    <%-- <div class="jqmWindow" id="dialog">

<a href="#" class="jqmClose">Close</a>
  <FC2:FilterCustomer2 ID="FilterCustomer1" runat="server" />
     </div>--%>
</asp:Content>
